import { BaseNode } from '@/components/complex/BaseNode';
import { defineComponentAndRegisterToGraph } from '@/components/complex/BaseNode/define';
import { NodeDrawer } from '@/components/complex/NodeDrawer';
import { NODE_TYPE } from '@/constants/config';

import { Output } from './output';

export const EndNode = defineComponentAndRegisterToGraph(NODE_TYPE.END, (props) => {
  return (
    <NodeDrawer placement="bottom" trigger={<BaseNode {...props} nodeType={NODE_TYPE.END} />}>
      <Output />
    </NodeDrawer>
  );
});
